|||##########################################################################
|||## A Macroquest2 Casino written by Grimshad & Killians
|||## casinosimple.mac - Handles all simple code
|||##########################################################################
|||---------------------------------------------------------------------------------------------------------Simple Events
#event Simple "#1# #*# 'Simple'"
#event PlaySimple "#1# says, 'Play Simple'"
|||---------------------------------------------------------------------------------------------------------Simple info
Sub Event_Simple(Line, Player)
	/if (${Debug}) /echo in Simple(${Player})
	/varset Player ${Player.Right[-2].Left[-1]}
	/delay ${TellDelay}
	/tell ${Player} In this game, you simply /ran 100 and if you get 60-95 you win double your money. If you get 96-99 you triple your money. If you get 100 you quadruple your money. [Play Simple]?
/return
|||---------------------------------------------------------------------------------------------------------Simple Game
Sub Event_PlaySimple(Line, Player)
	/if (${Debug}) /echo in PlaySimple(${Player})
	/varset Player ${Player.Right[-2].Left[-1]}
	/if (!${Defined[${Player}]}) {
		/call BankedCheck ${Player}
		/if (!${Macro.Return}) /return
	}
	|||If player is still at blackjack or roulette table, don't let them switch games.
	/if (${${Player}[2]} == 3 || ${${Player}[2]} == 4) {
		/say ${Player}, Please wait until you are removed from your current table before starting a new game.
		/return
	}
	/call SetPlayerStatus ${Player} NONE 2 NONE
	/say ${Player}, please place your [bet #] and /ran 100.
/return

Sub PlayerSimple(Player, int RollMin, int RollMax, int Roll)
	/if (${Debug}) /echo in PlayerSimple(${Player}, RollMin ${RollMin}, RollMax ${RollMax}, Roll ${Roll})
	/if (${RollMin} || ${RollMax} != 100) {
		/say ${Player}, Your roll was incorrect, please /ran 100.
	} else {
	
		/if (!${${Player}[3]}) {
			/say ${Player}, You need to [Bet #] before you can roll.
		} else {
		
			/if (${Roll}==100) {
				/say ${Player} hit the jackpot! +${Math.Calc[${${Player}[3]}*3].Int}
				/call PlayerWins ${Player} ${Math.Calc[${${Player}[3]}*3]}
			} else /if (${Roll} >= 96 && ${Roll} <= 99) {
				/say ${Player} wins, +${Math.Calc[${${Player}[3]}*2].Int}
				/call PlayerWins ${Player} ${Math.Calc[${${Player}[3]}*2]}
			} else /if (${Roll} >= 60 && ${Roll} <= 95) {
				/say ${Player} wins, +${Math.Calc[${${Player}[3]}].Int}
				/call PlayerWins ${Player} ${Math.Calc[${${Player}[3]}]}
			} else /if (${Roll} < 60) {
				/say Sorry ${Player} has lost. -${${Player}[3]}
				/call PlayerLoses ${Player} ${${Player}[3]}
			}
			/call ResetPlayerStatus ${Player} 2
		}
	}
/return